#ifndef INET_MY_REACTOR_H
#define INET_MY_REACTOR_H

#include "SelectorReactor.h"
#include "EventHandler.h"
#include "EventTypes.h"
#include "Reactor.h"

#include <sys/select.h>

class MyReactor : public Reactor
{
 public:
  void registerHandler(EventHandler * eh, EventType et);
  void removeHandler(EventHandler * eh, EventType et);
  void handleEvents(struct timeval * timeout = 0);
  static MyReactor * instance();

 private:
  static MyReactor * instance_;
  SelectorReactor * reactor_;
  MyReactor();
};

#endif

